var _Container = require('component/container.js');
var _inherit = require('core/inherit.js');
var _Cell = require('scenes/game/cell.js');

var _global = require('global/global.js');
var R = require('res/texture.js').R;

var CELL_X = 60;
var CELL_Y = 35;

// ==========================
// NextCell
// ==========================
function NextCell() {
    _Container.call(this);

    this.addChild(this.mBg = _global.spriteNode(R.game.next_bg));

    this.addChild(this.mShadow = _global.spriteNode(R.cards.card_bg));
    this.mShadow.setAnchor(0.5, 0.5);
    this.mShadow.setScale(0.5, 0.5);
    this.mShadow.setPosition(CELL_X, CELL_Y);

    this.addChild(this.mCell = new _Cell(1));
    this.mCell.setScale(0.5, 0.5);
    this.mCell.setPosition(CELL_X, CELL_Y);
    this.setSize(this.mBg.getSize());
}
_inherit(NextCell, _Container);
NextCell.prototype.updateNext = function (count) {
    this.mCell.updateCount(count);
};

module.exports = NextCell;